<template>
  <el-dialog v-model="open" title="场地详情" width="600px" append-to-body :close-on-click-modal="false">
    <el-descriptions :column="2" border>
      <el-descriptions-item label="场地名称">{{ form.name }}</el-descriptions-item>
      <el-descriptions-item label="场地序号">{{ form.orderIndex }}</el-descriptions-item>
      <el-descriptions-item label="是否联动场地">
        <span v-if="form.linkFlag=='1'">是</span>
        <span v-else>否</span>
      </el-descriptions-item>
      <el-descriptions-item label="父级场地">{{ form.parentName }}</el-descriptions-item>
      <el-descriptions-item label="起订时间">{{ form.minReserveTime==0?'半小时':(form.minReserveTime==1?'1小时':'2小时') }}</el-descriptions-item>
      <el-descriptions-item label="所属项目">{{ form.projectName }}</el-descriptions-item>
      <el-descriptions-item label="状态">
        <el-tag v-if="form.status==0" type="warning">禁用</el-tag>
        <el-tag v-else type="success">启用</el-tag>
      </el-descriptions-item>
    </el-descriptions>
  </el-dialog>
</template>

<script setup>
import { toRefs } from '@vueuse/shared'
import { computed } from '@vue/reactivity'

const props = defineProps({
  props: {
    type: Object,
    default: () => ({
      open: false,
      title: ''
    })
  }
})
const { open } = toRefs(props.props)
const form = computed(() => props.props.data)

</script>

<style scoped>

</style>
